package com.lill.common.component.server.config;

import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UndertowNeedConfig {
	
	@Bean
	public ConfigurableServletWebServerFactory ServletWebServerFactory() {
		UndertowServletWebServerFactory undertowFactory=new UndertowServletWebServerFactory();
		undertowFactory.addBuilderCustomizers();
		undertowFactory.setIoThreads(4);
		undertowFactory.setWorkerThreads(3072);
		undertowFactory.setBufferSize(1024);
		undertowFactory.setUseDirectBuffers(true);
		return undertowFactory;
	}
	

	
}
